package com.example.demo.nyxcosmetics;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.metadata.data.WriteCellData;
import lombok.Data;
import org.apache.commons.math3.stat.descriptive.summary.Product;

import java.math.BigDecimal;
import java.net.URL;
import java.util.List;


@Data
@ContentRowHeight(100/5)
@ColumnWidth(50)
public class ExportDate {
    @ExcelProperty("名称")
    @ColumnWidth(50)
    private String name;
    @ExcelProperty("副标题")
    @ColumnWidth(80)
    private String subName;

    @ColumnWidth(30)
    @ExcelProperty("类别")
    private String category;
    @ExcelProperty("销售价格")
    @ColumnWidth(15)
    private BigDecimal price;
    @ExcelProperty("原价")
    @ColumnWidth(15)
    private BigDecimal salePrice;
    @ExcelProperty("币种")
    @ColumnWidth(15)
    private String currency;
    @ExcelProperty("库存")
    @ColumnWidth(15)
    private String stock;
    @ExcelProperty("图片")
//    private URL image;
//    private String imageUrl;
    private WriteCellData<String> image;

    @ExcelProperty("产品详情")
    private List<ExportDate> products;


}
